home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 16 code / Simple Drag / SimpleDrag.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-29  |  1.9 KB  |  68 lines  |  [TEXT/KAHL]

  1. /*
  2.  *  SimpleDrag.h     Drag Manager sample program header
  3.  *
  4.  *  v 1.0d2  7/93 Greg Robbins
  5.  *
  6.  */
  7.  
  8. #include <QuickDraw.h>
  9. #include <StandardFile.h>
  10. #include <Fonts.h>
  11. #include <Menus.h>
  12. #include <Dialogs.h>
  13. #include <Events.h>
  14. #include <TextEdit.h>
  15. #include <OSEvents.h>
  16. #include <Desk.h>
  17. #include <AppleEvents.h>
  18. #include <GestaltEqu.h>
  19. #include <ToolUtils.h>
  20. #include <Processes.h>
  21. #include <Errors.h>
  22. #include <Drag.h>
  23. #ifdef THINK_C
  24. #include <BDC.h>
  25. #else
  26. #include <Packages.h>
  27. #endif
  28.  
  29.  
  30. // function prototypes
  31.  
  32. pascal OSErr DoAEOpenApplication(AppleEvent *, AppleEvent *, long refCon);
  33. pascal OSErr DoAEOpenDocuments(AppleEvent *, AppleEvent *, long refCon);
  34. pascal OSErr DoAEQuitApplication(AppleEvent *, AppleEvent *, long refCon);
  35. void DoHighLevelEvent(EventRecord *);
  36. OSErr InstallAppleEventHandlers(void);
  37. void DrawWindow(WindowPtr);
  38. PicHandle GetWindowPicture(WindowPtr);
  39. OSErr SetWindowPicture(WindowPtr, PicHandle);
  40. OSErr SetEmptyWindowPicture(WindowPtr);
  41. OSErr SetWindowPictureFromFile(FSSpecPtr, WindowPtr);
  42. Boolean KeyIsDown(short);
  43. void ConcatPascalStrings(StringPtr, StringPtr);
  44. OSErr GetApplicationName(StringPtr);
  45. WindowPtr OpenPictureInNewWindow(FSSpecPtr);
  46. void DoOpen(void);
  47. WindowPtr DoNewWindow(void);
  48. void DoCloseWindow(WindowPtr);
  49. void DoQuit(void);
  50. WindowPtr DoAboutWindow(void);
  51. WindowPtr ReportErrorInWindow(WindowPtr, StringPtr, OSErr);
  52. WindowPtr ReportStringInWindow(WindowPtr, StringPtr);
  53. void CreateMenus(void);
  54. void DoMenuCommand(long);
  55.  
  56. // routines to support dragging
  57.  
  58. Boolean MouseIsInContentRgn(DragReference, WindowPtr);
  59. Boolean DragItemsAreAcceptable(DragReference);
  60. Boolean DragIsNotInSourceWindow(DragReference);
  61. pascal OSErr MyTrackingHandler(DragTrackingMessage, WindowPtr,
  62.     void *, DragReference);
  63. pascal OSErr MyReceiveHandler(WindowPtr, void *, DragReference);
  64. OSErr InstallDragHandlers(WindowPtr theWindow);
  65. void RemoveDragHandlers(WindowPtr);
  66. void OutlineRegion(RgnHandle);
  67. OSErr DoWindowContentDrag(WindowPtr, EventRecord *);
  68.